<template>
    <div class="single_text">
        <el-form ref="picList" :model="picList" :rules="rules" label-width="55px" style="margin-top: 10px">
            <el-form-item label="图片" prop="imageId" :rules="rules1">
                <upload-file @remove="removePic" @success="uploadSuccess" :limit="piclimit">
                </upload-file>
            </el-form-item>
            <p class="upload_text">仅可上传一个文件（视频/音频），视频仅支持MP4，音频仅支持MP3，音/视频大小不得超过2G.</p>
            <el-form-item>
                <el-input v-model="picList.title1" class="input1"></el-input>  <el-input v-model="picList.title2" class="input2"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>
/**
* description: 单图文模块
*/
import uploadFile from '../upload/upload.vue'

export default {
    components: {
        uploadFile,
    },
    data() {
        return {
            piclimit: 5,
            uploadForm: {
                piccontent: [],
                desc: ''
            },
            picList:{
                title1:'',
                title2:''
            }
        }
    },
    methods: {
        removePic(picnum, file, fileList) {
            this.uploadForm.piccontent = fileList[0]
        },

        uploadSuccess(picnum, file, fileList) {
            this.uploadForm.piccontent = fileList[0]
        },
        submit() {
           return {formData: this.picList}
        },
    }
}
</script>

<style lang="scss" scoped>
.single_text {
    position: relative;
    margin-left: 44px;
    padding-bottom: 10px;
}
.upload_text{
    margin-bottom: 22px;
}
.input1{
    width: 18% !important;
    margin-right: 12px;
}
.input2{
    width: 52% !important;
}
</style>